<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ include file="/page/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp"%>
<link
	href="${pageContext.request.contextPath}/frontframe/easyui/themes/easyui-extend.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function save() {
		var str_data = $("#form1 input").map(function() {
			return ($(this).attr("name") + '=' + $(this).val());
		}).get().join("&");
		$.ajax({
			url : "${ctx}/appWxModelConfig/addWxModelConfig",
			type : "POST",
			dataType : "json",
			data : str_data,
			async : false,
			success : function(data) {
				if (data.flag > 0) {
					alert("保存成功！");
					//window.location.reload();
				}
			},
			error : function() {
				alert("error");
			}
		});

	}

	function changeValue(Value, tagname) {
		document.getElementById(tagname).value = Value;
	}

	function goBack() {
		window.history.back(-1);
	}

</script>
</head>
<body>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">微信菜单配置</h3>
		</div>
		<div class="panel-body">
			<form class="form-horizontal" role="form" id="form1">
				<div class="form-group">
					<label class="col-xs-2 control-label" for="dxModelId">短信模版ID</label>
					<div class="col-xs-4">
						<input class="form-control" id="dxModelId" name="dxModelId"
							type="text" placeholder="" />
					</div>
					<label class="col-xs-2 control-label" for="modelLineNum">模版行号</label>
					<div class="col-xs-4">
						<input class="form-control" id="modelLineNum" name="modelLineNum"
							type="text" placeholder="模版内行号" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-2 control-label" for="appId">APPID</label>
					<div class="col-xs-4">
						<input class="form-control" id="appId" name="appId" type="text"
						 value="${appid}" placeholder="" readonly="readonly"/>
					</div>
					<label class="col-xs-2 control-label" for="lineName">微信行名</label>
					<div class="col-xs-4">
						<input class="form-control" id="lineName" name="lineName"
							type="text" placeholder="微信模版中的行名" />
					</div>
				</div>
				<div class="form-group">


					<label class="col-xs-2 control-label" for="lineStaticPart">行固定部分</label>
					<div class="col-xs-4">
						<input class="form-control" id="lineStaticPart"
							name="lineStaticPart" />
					</div>
					<label class="col-xs-2 control-label" for="lineChangePart">行可变部分</label>
					<div class="col-xs-4">
						<input class="form-control" id="lineChangePart"
							name="lineChangePart" type="text" value=""  />
					</div>

				</div>

				<div class="form-group  text-center">
					<button type="button" class="btn btn-default" onclick="save();">保存</button>
					<button type="button" class="btn btn-default" onclick="goBack()">返回</button>
				</div>
			</form>
		</div>
	</div>

</body>
</html>
